a11y: Add an "accessibility" section to the builder XML tree
authorEmmanuele Bassi <ebassi@gnome.org>
Wed, 21 Oct 2020 12:24:22 +0000 (13:24 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Wed, 21 Oct 2020 12:33:37 +0000 (13:33 +0100)
commit9e4316bf96cf53d56eac441541906c51a470c4d1
tree884339241ff8d3b4011c3d072c7e88a9a3c390d8
parent4ea2a6628f0b4a951ec99b401858fa8bec5d8c7c
a11y: Add an "accessibility" section to the builder XML tree

Accessible attributes are not GObject properties. This means that we
need a custom parser for setting attributes in our UI description files.

The new section is defined as a sub-tree with the `<accessibility>`
element at its root, and elements for each type of accessible
attributes, i.e. properties, relations, and states:

```xml
  <object class="..." id="...">
    <accessibility>
      <property name="label">The accessible label</property>
      <state name="pressed">false</state>
      <relation name="labelled-by">label1</relation>
    </accessibility>
  </object>
```

The name of the attribute is the enumeration value; the value is defined
by the WAI-ARIA specification.
gtk/gtkwidget.c